how to make substring of string